<?php $this->load->view("admin/$adminCurrentTemplate/commonHead");?>
    	<ul>
        	<li class="guid">
            	<ul>
                    <li class="chkBox"><input type="checkbox" name="all" id="all" /></li>
                    <li class="index">排序索引</li>
                    <li class="create-time">创建时间</li>
                    <li class="cate">所属栏目</li>
                    <li class="title">文档标题</li>
                </ul>
            </li>
            <form name="listForm" id="listForm" method="post" action="<?php echo $phpSelf;?>">
            <input type="hidden" name="del" id="del" value="" />
            <input type="hidden" name="active" id="active" value="" />
            <?php 
            if(count($archivesList)>0){
            	foreach($archivesList as $item):
            ?>            
        	<li class="item">
            	<ul>
            		<li class="chkBox"><input type="checkbox" name="id[]" id="id_<?=$item->id?>" class="id-checkbox" value="<?=$item->id?>" /></li>
                    <li class="index"><input type="text" name="index" id="index_<?=$item->id?>" value="<?=$item->oIndex?>" class="index-input" /></li>
                    <li class="create-time" title="<?php echo date('Y-m-d h:m:s',$item->createTime);?>"><?=date('Y-m-d',$item->createTime);?></li>
                    <li class="cate"><?=$item->categoryTitle?></li>
                    <li class="title" title='<?php echo $item->title?>'>{<?=$item->id?>}<?=$item->title?></li>
                    <li class="single-menu"><a href="<?php if(isset($item->adminEditCon)){echo site_url($item->adminEditCon.'/'.$item->id);}else{echo '#';}?>" title="修改" class="edit">修改</a><a href="#" title="删除" class="del">删除</a></li>
                </ul>
            </li>
            <?php endforeach;?>
            <div class="apptend-container hide"></div>
            </form>
            <li class="page">
            	<?php echo $this->pagination->create_links();?>
            </li>
            <?php }else{?>
            <div class="apptend-container hide"></div>
            </form>
            <li class='no-list'>对不起，暂无数据！</li>
            <?php }?>
        </ul>
<div class="moveBox hide">
	<div class="search-box-row">
		<span class="guid">移 动 至：</span>
		<span class="formItem">
			<select size="1" name="categoryId" id="categoryId" class="single-select">
				<?php 
				$str = '';
				foreach ($categoryList as $value){
					$str .= "<option value=\"".$value->id."\"";
					if($value->id==$categoryId){
						$str .= " selected=\"selected\"";
					}
					$str .=">"; 
					for($i=1;$i<$value->deep;$i++){
						$str .= "&nbsp;|-";
					} 
					$str .= $value->title."</option>\n"; 
				}
				echo $str;
				?>
			</select>
		</span>
	</div>
</div>
<div class="paramBox hide">
	<div class="search-box-row">
		<span class="guid">启用状态：</span>
		<span class="formItem">
			<input type="radio" name='disabled' id='disabled_0' value="0"<?php if($disabled=='0' && strlen($disabled)>0) echo "checked='checked'";?> /><label for="disabled_0">启用</label>
			<input type='radio' name='disabled' id='disabled_1' value='1'<?php if($disabled=='1') echo "checked='checked'";?> /><label for="disabled_1">禁用</label>
		</span>
	</div>
	<div class="search-box-row">
		<span class="guid">审核状态：</span>
		<span class="formItem">
			<input type="radio" name='ismake' id='ismake_0' value="0"<?php if($ismake=='0' && strlen($ismake)>0) echo "checked='checked'";?> /><label for="ismake_0">未审核</label>
			<input type='radio' name='ismake' id='ismake_1' value='1'<?php if($ismake=='1') echo "checked='checked'";?> /><label for="ismake_1">已审核</label>
		</span>
	</div>
	<div class="search-box-row" style="height:50px;">
		<span class="guid" style="height:50px; line-height:50px;">档案属性：</span>
		<span class="formItem">
			<input type="checkbox" name="flag[]" id="flag_h" value="h" /><label for="flag_h">头条</label>
			<input type="checkbox" name="flag[]" id="flag_c" value="c" /><label for="flag_c">推荐</label>
			<input type="checkbox" name="flag[]" id="flag_p" value="p" /><label for="flag_p">图片</label><br />
			<input type="checkbox" name="flag[]" id="flag_j" value="j" /><label for="flag_j">跳转</label>
			<input type="checkbox" name="flag[]" id="flag_f" value="f" /><label for="flag_f">幻灯</label>
			<input type="checkbox" name="flag[]" id="flag_s" value="s" /><label for="flag_s">滚动</label>
		</span>
	</div>
	<div class="search-box-row">
		<span class="guid">点 击 数：</span>
		<span class="formItem"><input type="text" name="click" id="click" value="<?php if(isset($click)) echo $click;?>" class="txtBox" /></span>
	</div>
</div>
<div class="searchBox hide">
	<div class="search-box-row">
		<span class="guid">启用状态：</span>
		<span class="formItem">
			<input type="radio" name='disabled' id='disabled_' value=''<?php if(strlen($disabled)==0) echo " checked='checked'";?> /><label for='disabled_'>所有</label>
			<input type="radio" name='disabled' id='disabled_0' value="0"<?php if($disabled=='0' && strlen($disabled)>0) echo "checked='checked'";?> /><label for="disabled_0">启用</label>
			<input type='radio' name='disabled' id='disabled_1' value='1'<?php if($disabled=='1') echo "checked='checked'";?> /><label for="disabled_1">禁用</label>
		</span>
	</div>
	<div class="search-box-row">
		<span class="guid">审核状态：</span>
		<span class="formItem">
			<input type="radio" name='ismake' id='ismake_' value=''<?php if(strlen($ismake)==0) echo " checked='checked'";?> /><label for='ismake_'>所有</label>
			<input type="radio" name='ismake' id='ismake_0' value="0"<?php if($ismake=='0' && strlen($ismake)>0) echo "checked='checked'";?> /><label for="ismake_0">未审核</label>
			<input type='radio' name='ismake' id='ismake_1' value='1'<?php if($ismake=='1') echo "checked='checked'";?> /><label for="ismake_1">已审核</label>
		</span>
	</div>
	<div class="search-box-row">
		<span class="guid">所属栏目：</span>
		<span class="formItem">
			<select size="1" class="single-select" name="categoryId" id="categoryId">
				<option value=''<?php if(isset($categoryId)) if(strlen($categoryId)>0) echo ' selected'?>>所有栏目</option><?php 
				$str = '';
				foreach ($categoryList as $value){
					$str .= "<option value=\"".$value->id."\"";
					if(isset($categoryId)){
						if($value->id==$categoryId){
							$str .= " selected=\"selected\"";
						}
					}
					$str .=">";
					for($i=0;$i<$value->deep;$i++){
						$str .= "&nbsp;|-";
					}
					$str .= $value->title."</option>\n";
				}
				echo $str;?>
			</select>
		</span>
	</div>
	<div class="search-box-row">
		<span class="guid">文档标题：</span>
		<span class="formItem"><input type="text" name="title" id="title" value="<?php if(isset($title)) echo $title;?>" class="txtBox" /></span>
	</div>
	<div class="search-box-row">
		<span class="guid">更新时间：</span>
		<span class="formItem"><input type="text" name="upTimeStart" id="upTimeStart" value="<?php if(isset($upTimeStart)) echo $upTimeStart;?>" class="timeBox" onClick="WdatePicker();" readonly="readonly" /><label>至</label><input type="text" name="upTimeEnd" id="upTimeEnd" value="<?php if(isset($upTimeEnd)) echo $upTimeEnd;?>" class="timeBox" onClick="WdatePicker();" readonly="readonly" /></span>
	</div>
	<div class="search-box-row">
		<span class="guid">添加时间：</span>
		<span class="formItem"><input type="text" name="createTimeStart" id="createTimeStart" value="<?php if(isset($createTimeStart)) echo $createTimeStart;?>" class="timeBox" onClick="WdatePicker();" readonly="readonly" /><label>至</label><input type="text" name="createTimeEnd" id="createTimeEnd" value="<?php if(isset($createTimeEnd)) echo $createTimeEnd;?>" class="timeBox" onClick="WdatePicker();" readonly="readonly" /></span>
	</div>
</div>
<script type="text/javascript">
var editWidth = 778;
var editHeight = 516;
var searchWidth = 315;
var searchHeight = 231;
var setParamHeight = 204;
$(function(){
	$('.apptend-container').html($('.searchBox').html());
});
</script>
<?php $this->load->view("admin/$adminCurrentTemplate/commonFoot");?>

<script type="text/javascript">
$(function(){
	$(".main > .position > ul > .menu_move > ul a").each(function(i){
		if(i>=3 && i<=10){$(this).parent().hide();}
	});
	$(".main > .position > ul > .menu_move > ul").height(88);
	
	var page_disabled = $('.apptend-container input[name="disabled"]:checked').val();
	var page_ismake = $('.apptend-container #ismake').val();
	var page_title = $('.apptend-container #title').val();
	var page_categoryId = $('.apptend-container #categoryId').val();
	var page_upTimeStart = $('.apptend-container #upTimeStart').val();
	var page_upTimeEnd = $('.apptend-container #upTimeEnd').val();
	var page_createTimeStart = $('.apptend-container #createTimeStart').val();
	var page_createTimeEnd = $('.apptend-container #createTimeEnd').val();
	var paramSplit = '&';
	var paramString = '';
	
	if(page_disabled.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'disabled=' + page_disabled;
	}
	
	if(page_ismake>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'ismake=' + page_ismake;
	}
	
	if(page_title.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'title=' + page_title;
	}

	if(page_categoryId.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'categoryId=' + page_categoryId;
	}

	if(page_upTimeStart.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'upTimeStart=' + page_upTimeStart;
	}
	
	if(page_upTimeEnd.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'upTimeEnd=' + page_upTimeEnd;
	}
	
	if(page_createTimeStart.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'createTimeStart=' + page_createTimeStart;
	}
	
	if(page_createTimeEnd.length>0){
		if(paramString.length>0){
			paramString += paramSplit;
		}
		paramString += 'createTimeEnd=' + page_createTimeEnd;
	}
	
	$('.page a').each(function(){
		var self = $(this);
		var selfHref = self.attr('href');
		if(paramString.length>0){
			self.attr('href',selfHref + '?' + paramString);
		}
	});
});
</script>